package com.lxs.gitee001;

import com.lxs.gitee001.model.response;
import com.lxs.gitee001.service.GiteeOAuthService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Gitee001Application {

    public static String accessToken = null;

    public static void main(String[] args) {
        SpringApplication.run(Gitee001Application.class);
        System.out.println("gitee 001 服务启动");
        try{
            response.TokenResponse response = new GiteeOAuthService().getAccessTokenByPassword("projects user_info issues notes");
            System.out.println(response);
            accessToken = response.getAccessToken();
        }
        catch (Exception e){
            e.printStackTrace();
        }

        System.out.println(accessToken);
    }
}
